﻿using System;
using System.Collections.Generic;
using System.Web.Services;
using MedRegService.Utils;
using MedRegSevice.Utils;

namespace MedRegService
{
    /// <summary>
    /// Web служба для получения сведений из реестра медицинских работников
    /// Применяется с приложением Midic
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // Чтобы разрешить вызывать веб-службу из скрипта с помощью ASP.NET AJAX, раскомментируйте следующую строку. 
    [System.Web.Script.Services.ScriptService]
    public class Service1 : System.Web.Services.WebService
    {



        [WebMethod(Description = "This test method, use 5A4CDD9F-A102-4005-9A96-0A9571BC0F82 as guid")]
        public List<FlatEmployee> GetFlatEmployeeListTest(string guid) {
            return GetFlatEmployeeList(new Guid(guid));
        }

        [WebMethod(Description = "This method call will get the List employee prepared for Medic app.")]
        public List<FlatEmployee> GetFlatEmployeeList(Guid LPUID)
        {
            return FlatEmployee.GetEmployeeList(LPUID);
        }

        [WebMethod(Description = "This method call will get the List employee prepared for Medic app.")]
        public List<FlatEmployee> GetFlatEmployeeListByLPUandSurname(Guid LPUID, string surname, int count)
        {
            return FlatEmployee.GetEmployeeList(LPUID, surname, count);
        }

        [WebMethod(Description = "This test method call, use 5A4CDD9F-A102-4005-9A96-0A9571BC0F82 as guid")]
        public List<FlatEmployee> GetFlatEmployeeListByLPUandSurnameTest(string LPUID, string surname, int count)
        {
            
            return FlatEmployee.GetEmployeeList(new Guid(LPUID), surname, count);
        }
      

       [WebMethod(Description = "This test method call will get the List of LPU prepared for Medic app.")]
       public List<FlatLPU> GetFlatLPUList()
       {
           return FlatLPU.GetFlatLPUList();
       }
    }
}